﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooGameplayGameUtilsDebugForLuaWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Gameplay.GameUtils.DebugForLua);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
			
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 8, 6, 6);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "IsEditorMode", _m_IsEditorMode_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetLocalLogState", _m_GetLocalLogState_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "_LOG_TYPE_", _m__LOG_TYPE__xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "SwitchLogModule", _m_SwitchLogModule_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "SaveLogLocalState", _m_SaveLogLocalState_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "UploadLog", _m_UploadLog_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "IsDebugPackage", _m_IsDebugPackage_xlua_st_);
            
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "enablePrefix", _g_get_enablePrefix);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "enableFrameCount", _g_get_enableFrameCount);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "enableLuaStackTrace", _g_get_enableLuaStackTrace);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "enableDumpTree", _g_get_enableDumpTree);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "LogLevel", _g_get_LogLevel);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "OnEditorSwitchLog", _g_get_OnEditorSwitchLog);
            
			Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "enablePrefix", _s_set_enablePrefix);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "enableFrameCount", _s_set_enableFrameCount);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "enableLuaStackTrace", _s_set_enableLuaStackTrace);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "enableDumpTree", _s_set_enableDumpTree);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "LogLevel", _s_set_LogLevel);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "OnEditorSwitchLog", _s_set_OnEditorSwitchLog);
            
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new Yoozoo.Gameplay.GameUtils.DebugForLua();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gameplay.GameUtils.DebugForLua constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new Yoozoo.Gameplay.GameUtils.DebugForLua();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gameplay.GameUtils.DebugForLua constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_IsEditorMode_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                        var gen_ret = Yoozoo.Gameplay.GameUtils.DebugForLua.IsEditorMode(  );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetLocalLogState_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _moduleName = LuaAPI.lua_tostring(L, 1);
                    
                        var gen_ret = Yoozoo.Gameplay.GameUtils.DebugForLua.GetLocalLogState( _moduleName );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m__LOG_TYPE__xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 6&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable<object>(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)&& translator.Assignable<UnityEngine.Object>(L, 5)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6)) 
                {
                    int _logType = LuaAPI.xlua_tointeger(L, 1);
                    string _prefix = LuaAPI.lua_tostring(L, 2);
                    object _message = translator.GetObject(L, 3, typeof(object));
                    int _level = LuaAPI.xlua_tointeger(L, 4);
                    UnityEngine.Object _context = (UnityEngine.Object)translator.GetObject(L, 5, typeof(UnityEngine.Object));
                    int _features = LuaAPI.xlua_tointeger(L, 6);
                    
                    Yoozoo.Gameplay.GameUtils.DebugForLua._LOG_TYPE_( _logType, _prefix, _message, _level, _context, _features );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 5&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable<object>(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)&& translator.Assignable<UnityEngine.Object>(L, 5)) 
                {
                    int _logType = LuaAPI.xlua_tointeger(L, 1);
                    string _prefix = LuaAPI.lua_tostring(L, 2);
                    object _message = translator.GetObject(L, 3, typeof(object));
                    int _level = LuaAPI.xlua_tointeger(L, 4);
                    UnityEngine.Object _context = (UnityEngine.Object)translator.GetObject(L, 5, typeof(UnityEngine.Object));
                    
                    Yoozoo.Gameplay.GameUtils.DebugForLua._LOG_TYPE_( _logType, _prefix, _message, _level, _context );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gameplay.GameUtils.DebugForLua._LOG_TYPE_!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SwitchLogModule_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _moduleName = LuaAPI.lua_tostring(L, 1);
                    bool _isOn = LuaAPI.lua_toboolean(L, 2);
                    
                    Yoozoo.Gameplay.GameUtils.DebugForLua.SwitchLogModule( _moduleName, _isOn );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SaveLogLocalState_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    Yoozoo.Gameplay.GameUtils.DebugForLua.SaveLogLocalState(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UploadLog_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _url = LuaAPI.lua_tostring(L, 1);
                    
                    Yoozoo.Gameplay.GameUtils.DebugForLua.UploadLog( _url );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_IsDebugPackage_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                        var gen_ret = Yoozoo.Gameplay.GameUtils.DebugForLua.IsDebugPackage(  );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_enablePrefix(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.lua_pushboolean(L, Yoozoo.Gameplay.GameUtils.DebugForLua.enablePrefix);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_enableFrameCount(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.lua_pushboolean(L, Yoozoo.Gameplay.GameUtils.DebugForLua.enableFrameCount);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_enableLuaStackTrace(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.lua_pushboolean(L, Yoozoo.Gameplay.GameUtils.DebugForLua.enableLuaStackTrace);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_enableDumpTree(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.lua_pushboolean(L, Yoozoo.Gameplay.GameUtils.DebugForLua.enableDumpTree);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_LogLevel(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.xlua_pushinteger(L, Yoozoo.Gameplay.GameUtils.DebugForLua.LogLevel);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_OnEditorSwitchLog(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, Yoozoo.Gameplay.GameUtils.DebugForLua.OnEditorSwitchLog);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_enablePrefix(RealStatePtr L)
        {
		    try {
                
			    Yoozoo.Gameplay.GameUtils.DebugForLua.enablePrefix = LuaAPI.lua_toboolean(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_enableFrameCount(RealStatePtr L)
        {
		    try {
                
			    Yoozoo.Gameplay.GameUtils.DebugForLua.enableFrameCount = LuaAPI.lua_toboolean(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_enableLuaStackTrace(RealStatePtr L)
        {
		    try {
                
			    Yoozoo.Gameplay.GameUtils.DebugForLua.enableLuaStackTrace = LuaAPI.lua_toboolean(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_enableDumpTree(RealStatePtr L)
        {
		    try {
                
			    Yoozoo.Gameplay.GameUtils.DebugForLua.enableDumpTree = LuaAPI.lua_toboolean(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_LogLevel(RealStatePtr L)
        {
		    try {
                
			    Yoozoo.Gameplay.GameUtils.DebugForLua.LogLevel = LuaAPI.xlua_tointeger(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_OnEditorSwitchLog(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    Yoozoo.Gameplay.GameUtils.DebugForLua.OnEditorSwitchLog = translator.GetDelegate<System.Action<string, bool>>(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
